home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / slbbs131.zip / FILEDEF.LIB < prev    next >
Text File  |  1989-04-26  |  20KB  |  492 lines

  1.  
  2.  
  3. { FILEDEF.LIB }
  4. { File Definitions for Searchlight BBS, ver 1.28, 1.29, 1.30 }
  5.  
  6. { (C) Copyright 1987,88 by Frank LaRosa. ALL RIGHTS RESERVED.  }
  7.  
  8. { This file contains type declarations for the files created by Searchlight
  9.   BBS.  We are releasing this information to the public in order to foster
  10.   the development of third party DOORware and utility software.
  11.  
  12.   IF YOU USE THIS INFORMATION: Please follow the guidelines carefully.
  13.   Searchlight Software cannot be held responsible for failure of third party
  14.   software.  We reserve the right to change anything in these file definitions
  15.   although we will try to keep things as consistent as possible.
  16.  
  17.   All source code is Turbo Pascal 5.0.  If you are programming in another
  18.   language, note that STRING data types- string[n]- consist of a one-byte
  19.   string length followed by an array of n characters.  Thus, sizeof(string[n])
  20.   equals n+1.  Also note that the first record of a file is record 0, while
  21.   the first element in an array is (usually) 1.  For ordinal types, the
  22.   ordinal value of the first element is always 0.              }
  23.  
  24.  
  25.  
  26. { The following files make up the core of the BBS. They will reside in the
  27.   current directory when the BBS is run.                       }
  28.  
  29. const configspec  = 'CONFIG.BBS';   { Configuration & Current Info }
  30.       userspec    = 'USER.BBS';     { User File }
  31.       indexspec   = 'INDEX.BBS';    { Sub-Board Index }
  32.       textspec    = 'MESSAGE.BBS';  { Message Texts File }
  33.  
  34.       logspec     = 'LOG.BBS';      { Caller Log }
  35.       quotespec   = 'QUOTES.BBS';   { Logoff Quotes }
  36.       dirspec     = 'FILEDIR.DEF';  { UL/DL Directory Definitions }
  37.       doorspec    = 'DOORS.DEF';    { External Program Definitions }
  38.  
  39. const maxsub    =  24;  { max number of sub boards }
  40.       maxmsg    = 290;  { max number of messages per sub }
  41.       blocksize =  90;  { block size of message texts }
  42.       logsize   =  75;  { size of last caller log }
  43.       maxdir    =  35;  { max number of file directories }
  44.  
  45.  
  46. Type  { Preliminary Type Definitions }
  47.  
  48.      timetype = record   { time }
  49.        hour: byte;
  50.        minute: byte;
  51.      end;
  52.  
  53.      datetype = record   { date }
  54.        year: byte;
  55.        month: byte;
  56.        day: byte;
  57.      end;
  58.  
  59.      pwtype = array[1..3] of byte;  { 3-byte password }
  60.  
  61.      int3 = record               { long 3-byte integer }
  62.        low: integer;
  63.        hi: byte;
  64.      end;
  65.  
  66.      RSbaud = (B110,B150,B300,B600,B1200,B2400,B4800,B9600,B19200);
  67.        { rs232 baud rates }
  68.  
  69.      colortype = (NULLCOLOR,     { no color set }
  70.                   NORMAL,        { normal screen color for most i/o }
  71.                   INVERSE,       { inverse for input highlighting }
  72.                   COMCOLOR,      { color for command highlight }
  73.                   SUBCOLOR,      { subboard information }
  74.                   HEADCOLOR,     { color for headings }
  75.                   CHATCOLOR,     { chat mode color }
  76.                   SPECIAL,       { special prompts and messages }
  77.                   ERRCOLOR,      { error and warning messages }
  78.                   ALTCOLOR,      { alt. special color }
  79.                   PROMPTCOLOR ); { colour for prompts }
  80.  
  81.  
  82.  
  83.  
  84. Type  { File Type Definitions }
  85.  
  86.      Configtype = record   { format of CONFIG file }
  87.  
  88.        sysname: string[30];    { the name of the BBS }
  89.        syscalls: int3;         { total calls to system }
  90.        comport: byte;          { comm port to use, 1-4 }
  91.        bsupport: byte;         { baud rates supported }
  92.        newusers: boolean;      { new user registration }
  93.        bulletins: integer;     { pointer to bulletins }
  94.        progpath: string[40];   { path for program files }
  95.        textpath: string[40];   { path for text files }
  96.  
  97.        curruser: integer;      { current user ID number }
  98.        currboard: byte;        { current active sub board }
  99.        logtime: timetype;      { current time of logon }
  100.        remote: boolean;        { remote/local logon flag }
  101.        baudrate: rsbaud;       { caller's baud rate }
  102.        ansi: boolean;          { ANSI graphics mode indicator }
  103.        newlogon: boolean;      { set if main program not yet run }
  104.  
  105.        lastuser: integer;      { last user on the system }
  106.        lastquote: string[72];  { quote left by last user }
  107.        defaccess: byte;        { default new user access level }
  108.        deftimelimit: byte;     { default new user time limit }
  109.        rsactive: boolean;      { true if rs port active }
  110.        valaccess: byte;        { default validation access }
  111.        valtimelimit: byte;     { default validation timelimit }
  112.        deffile: byte;          { new user file access }
  113.        valfile: byte;          { validated file access }
  114.  
  115.        currdir: integer;       { current directory }
  116.        sysavail: boolean;      { sysop availability flag }
  117.        logfile: string[40];    { default log file }
  118.        paged: boolean;         { set if sysop paged }
  119.        timelimit: byte;        { time limit for this session }
  120.  
  121.        color: boolean;         { ANSI color mode indicator }
  122.        normback: byte;         { textbackground for normal }
  123.        invtext: byte;          { DEFUNCT }
  124.        invback: byte;          { textbackground for inverse }
  125.  
  126.        superuser: boolean;     { superuser alt-s status }
  127.        buffactor: integer;     { output buffer size }
  128.        hayes: boolean;         { unused }
  129.        maxmaillen: integer;    { max. lines in e-mail }
  130.        maxbulllen: integer;    { max. lines in bulletins }
  131.        laston: datetype;       { last logon date of current user }
  132.  
  133.        command: string[80];    { command line of currently active DOOR }
  134.        commtype: byte;         { command type }
  135.        commdir: string[80];    { default dir for command }
  136.        wp: boolean;            { write protection flag in door }
  137.  
  138.        relogtime: integer;     { min. time between logins }
  139.  
  140.        initstr: string[40];    { modem init string }
  141.        localstr: string[40];   { modem 'local' init string }
  142.        overpath: string[40];   { overlay path }
  143.  
  144.        abort: byte;            { abort type, for doors }
  145.        defaultpw: string[40];  { default password for uploads }
  146.        xratio: byte;           { dl/ul ratio }
  147.        activlog: boolean;      { activity logging flag }
  148.        presshard: byte;
  149.        modemmsg: boolean;      { true for modem msg baud detect }
  150.  
  151.        colorchart: array [NORMAL..PROMPTCOLOR]
  152.          of byte;              { color definitions }
  153.  
  154.        indoors: boolean;       { set if doors menu active }
  155.  
  156.        subtext: array[1..maxsub]
  157.          of boolean;           { subboard text message flags - these flags are
  158.                                  reset with each call, and set when a user
  159.                                  enters the corresponding subboard         }
  160.        dirtext: array[1..maxdir]
  161.          of boolean;           { file dir text message flags }
  162.  
  163.        incpath: string[40];    { path for message include files }
  164.        sysfile: string[40];    { path/filename for DOORS setup file }
  165.  
  166.      end;
  167.  
  168. {   NOTES:
  169.  
  170.   The CONFIG file is a fixed length, one record file containing the above
  171.   information.  Typically, a DOORware or utility program will read the config
  172.   file to pick up information about the currently active user, comm port,
  173.   etc.  All items from the CONFIG.EXE program are stored here.
  174.  
  175.   The BULLETINS field is a two-byte pointer into the MESSAGE.BBS file,
  176.   indicating the header record of the first bulletin.  The second bulletin
  177.   is chained onto the first via the "ID" field in the message header, etc.
  178.   A word of zero indicates the end of the chain.
  179.  
  180.   BSUPPOSRT is a bit field.  Bit 0 of this byte is set if 300 baud is
  181.   supported, bit 1 is set for 1200 baud support, etc.
  182.  
  183.   ALL FIELDS ARE RESERVED.  Searchlight Software reserves the right to use
  184.   all unused fields in future versions of Searchlight BBS.  If you want to
  185.   save your own information, you should create your own data files indexed
  186.   on user names and/or record numbers.  This goes for the rest of this file
  187.   as well.